package indoor.nexd.com.nexdmap.ui.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import indoor.nexd.com.nexdmap.R;

/**
 * Created by wangxu on 16/3/4.
 */
public class AboutmeActivity extends AppCompatActivity {

    WebView webView;


    @Bind(R.id.about_me_toplayout)
    View aboutMeTopLayout;

    private ImageView imgBack;
    private TextView tvTitle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about_me);
        ButterKnife.bind(this);
        webView = (WebView) findViewById(R.id.about_me);
        webView.loadUrl("file:///android_asset/about_me.html");
        getSupportActionBar().hide();
        // getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        initTopLayout();
    }

    private void initTopLayout() {
        imgBack = (ImageView) aboutMeTopLayout.findViewById(R.id.top_layout_back);
        tvTitle = (TextView) aboutMeTopLayout.findViewById(R.id.top_layout_title);
        tvTitle.setText("关于我们");
    }

    @OnClick(R.id.top_layout_back)
    public void OnClick(View v) {
//        startActivity(new Intent(this, NexdMapActivity.class));
        finish();
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {

        switch (item.getItemId()) {
            case android.R.id.home:
                this.finish();
                break;
        }

        return super.onOptionsItemSelected(item);

    }


}
